<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>个人基础信息变更查询</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script src="${pageContext.request.contextPath }/scripts/boot.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath }/scripts/LodopFuncs.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath }/scripts/PrintSample10.js" type="text/javascript"></script>
<style type="text/css">
 html, body{
     margin:0;padding:0;border:0;width:100%;height:100%;overflow:hidden;
 }    
</style>
</head>
<body>
<div style="width:100%;">
  <div class="mini-toolbar" style="border-bottom:0;padding:0px;">
    <table style="border:solid 1px #aaa;width:100%;">
      <tr>
        <td style="width:9%;text-align: right;">社会保障卡号:</td>
        <td style="width:15%;"><input name="aac001" class="mini-textbox" maxLength="10" emptyText="请输入社会保障卡号"  onenter="onKeyEnter"/></td>
        <td style="width:9%;text-align: right;">证件号码：</td>
        <td style="width:20%;"><input name="aac002" style="width:80%;" emptyText="请输入证件号码" maxLength="18" class="mini-textbox" onenter="onKeyEnter"/></td>
        <td style="width:6%;text-align: right;">姓名：</td>
        <td style="width:15%;"><input name="aac003" emptyText="请输入姓名" maxLength="25" class="mini-textbox" onenter="onKeyEnter"/></td>
        <td style="width:15%;text-align: center; white-space:nowrap;">
          <a class="mini-button" iconCls="icon-search" onclick="search()">查询</a>
          <a class="mini-button" iconCls="icon-remove"  onclick="onReset()">重置</a>
          <a class="mini-button" iconCls="icon-print"  onclick="Preview()">打印</a>
        </td>
      </tr>
    </table>
  </div>
  </div>
<div class="mini-fit">
  <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" allowResize="true"
       url="AC01.do?method=getAC01bg" idField="id" multiSelect="true">
    <div property="columns"> 
     <div type="checkcolumn" ></div>	
      <div field="aac001" width="120" headerAlign="center" allowSort="true">社会保障卡号</div>
      <div field="aac003" width="120" headerAlign="center" allowSort="true">姓名</div>
      <div field="aac058" width="120" headerAlign="center" allowSort="true">证件类型</div>
      <div field="aac002" width="120" headerAlign="center" allowSort="true">证件号码</div>
      <div field="aae155" width="120" headerAlign="center" allowSort="true" >变更项中文含义</div>
      <div field="aae123x" width="120" headerAlign="center" allowSort="true" >变更前信息</div>
      <div field="aae124x" width="120" headerAlign="center" allowSort="true">变更后信息</div>
      <div field="aae011" width="120" headerAlign="center" allowSort="true">经办人</div>
      <div field="aae036" width="120" headerAlign="center" allowSort="true" dateFormat="yyyy-MM-dd">经办时间</div>  
      <div field="aae013" width="120" headerAlign="center" allowSort="true">备注</div>  
    </div>
  </div>
</div>
<script type="text/javascript">
    mini.parse();
    var grid = mini.get("datagrid1"); 
    grid.load();   
    function search() {
      var aac001 = mini.getbyName("aac001").getValue().trim();
      var aac002 = mini.getbyName("aac002").getValue().trim();
      var aac003 = mini.getbyName("aac003").getValue().trim();
      if (aac001 == ""  && aac002 == "" && aac003 == "") {
         mini.alert("请输入查询条件！");
      }
      grid.load({ aac001: aac001, aac002: aac002, aac003: aac003});
      }
    function onKeyEnter(e) {
      search();
    }
    function onReset(e) {
      mini.getbyName("aac001").setValue("");
      mini.getbyName("aac002").setValue("");
      mini.getbyName("aac003").setValue("");
      
    }
    var LODOP; //声明为全局变量 
	function Preview() {	
		CreateTwoFormPage();
	}
    function CreateTwoFormPage(){
    	var row = grid.getSelecteds();
    	if(row.length<=0){
    		mini.alert("请选择变更信息，再点击打印按钮");
    		return ;
    	} else if(row.length >5){
   			mini.alert("选择不能超过五条");
   			return ;
   		}
   		LODOP=getLodop();
   		for(var i=0; i< row.length; i++){
			LODOP.ADD_PRINT_TEXT(100+i*30,23,80,20,row[i].aac001);
			LODOP.ADD_PRINT_TEXT(100+i*30,124,80,20,row[i].aac003);
			LODOP.ADD_PRINT_TEXT(100+i*30,211,70,20,row[i].aae155);
			LODOP.ADD_PRINT_TEXT(100+i*30,304,135,20,row[i].aae123x);
			LODOP.ADD_PRINT_TEXT(100+i*30,468,135,20,row[i].aae124x);
		}
   		LODOP.ADD_PRINT_TEXT(305,160,360,20,row.aae013);
		LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
   		LODOP.PREVIEW();
    }
</script>
</body>
</html>
